<div class="slidebar-left">
		<div class="box">
			<h4 class="title">DANH MỤC</h4>
			<div class="list">
				<ul  id="product-category" class="jactive category-product">
                    <?php wp_list_categories("taxonomy=danh-muc&title_li=&orderby=custom_sort&show_count=1") ?> 
				</ul>
			</div>
		</div>
		<hr/>
        
		<div class="box">
			<h4 class="title">GIÁ</h4>
			<div class="list left-filter-price scrollbar">
				<ul id="price-range" class="nols nomargin jactive category-product">
				<?php wp_list_categories("taxonomy=muc-gia&title_li=&orderby=custom_sort") ?>
				</ul>
			</div>
		</div>
		
		<div class="box">
			<h4 class="title">MÀU SẮC</h4>
			<div class="list">
				<ul id="select-color" class="nols nomargin jactive category-product"> 
		<?php
		$terms = get_terms("color");
		foreach($terms as $term){  
			$bgcolor = get_tax_meta($term,"color");
			if($bgcolor=="" || $bgcolor=="#"){
				$bgimg_id = get_tax_meta($term,"image");
				if(isset($bgimg_id['id'])){ ?>
                    <li>
                        <a class="taxonomy-mau" rel="<?php echo $term->term_id?>" title="<?php echo $term->name?>" href="<?php echo get_term_link($term,"color")?>"><?php echo wp_get_attachment_image($bgimg_id['id'],"thumbnail",false,"class=image-crop");?></a>
                    </li>
				<?php } ?> 
            <?php }else{ ?>
                <li>
    				<a class="taxonomy-mau" rel="<?php echo $term->term_id;?>" style="background:<?php echo  $bgcolor; ?>" title="<?php echo $term->name?>" href="<?php echo get_term_link($term,"color")?>"></a>
    	        </li>
            <?php }
        } ?>
				</ul>
				<div class="clearfix"></div> 
			</div>
		</div>
        <!--D - Search star-->
        <div class="box">
			<h4 class="title">ĐÁNH GIÁ</h4>
			<div class="list">
                <div class="fct-bd" style="">
    <ul id="facet_rating" >

            <?php
            $mang_terms=get_terms('rating',"hide_empty=0&orderby=custom_sort&order=asc&parent=0");
            $dem=0;
            foreach($mang_terms as $mang_term)
            {
                
                $query=array(
                'post_type'=>'tmp',
                'posts_per_page'=>-1,
                'orderby'=>'post_date',
                'order'=>'desc',           
    			'tax_query'=>array(
    			array(
    			'taxonomy'=>'rating',
    			'field'=>'slug',
    			'terms'=>$mang_term->slug
    			)
    			)
                );
                $the_query=null;
                $the_query=new WP_Query($query);
               
                $dem++;
              ?>
            <li class="cnv-level-<?php echo $dem; ?>">
                <a href="<?php echo get_term_link($mang_term,'rating'); ?>">
                    <span class="itm-ratStars ui-inlineBlock">
                        <span class="itm-ratStars itm-ratRating" style="width: <?php echo ($mang_term->name * 20) ?>%;"></span>
                    </span>
                    <span class="cnv-items">&amp; cao hơn (<?php echo $the_query->post_count; ?>)</span>
                </a>
            </li>
            <?php } ?>
        
    
          
    
		  </ul></div>
            </div>
         </div>
         <!--D -end Search star--> 		
		<div class="box">
			<div id="category-description">
                <?php
                $_page = get_page(get_page_id("san-pham"));
                echo wpautop($_page->post_content);
                ?>
			</div>
		</div>
	</div>